﻿using System;
using System.ComponentModel;
using System.Windows;

namespace Brjnk.GpxExplorer.UI
{
    /// <summary>
    /// Interaction logic for TimeCorrectionWindow.xaml
    /// </summary>
    public partial class TimeCorrectionWindow : Window, INotifyPropertyChanged
    {
        public TimeCorrectionWindow()
        {
            InitializeComponent();
            txbInput.DataContext = this;
        }

        private TimeSpan timeCorrection;

        public TimeSpan TimeCorrection
        {
            get { return timeCorrection; }
            set { timeCorrection = value; OnPropertyChanged("TimeCorrection"); }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        private void OnPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = false;
        }

        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            this.DialogResult = true;
        }
    }
}